/*
 * This class creates a colorscale for nodes
 * Writend by Wenyi An
 * 15/06/2013
 * */
package prefuse.demos;

import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;

public class ColorScale extends JFrame {

  public static void main(String[] args) {
    ColorScale gst = new ColorScale();
    gst.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    gst.setSize(500, 140);
    gst.setVisible(true);
  }

  public ColorScale() {
    Container pane = getContentPane();
    pane.setLayout(new GridLayout(2, 2));
    JLabel labelForTerminalColor = new JLabel("RValue rank for Terminal Node");
	labelForTerminalColor.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    pane.add(labelForTerminalColor);
    pane.add(new ColorScaleComponent(255,255,255,0,"RED"));
    JLabel labelForDENodeColor = new JLabel("RValue  rank for Decision/Event Node");
   	labelForDENodeColor.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    pane.add(labelForDENodeColor);
    pane.add(new ColorScaleComponent(255,255,255,0,"GREEN"));
  }

}